package com.dhcc.utils;

import java.io.FileInputStream;
import java.io.InputStream;
import java.util.Iterator;
import java.util.zip.ZipFile;

import com.dhcc.utils.zip.InputStreamIterator;
import com.dhcc.utils.zip.NamedInputStream;

/**
 * 解压缩
 * @author hibean
 *
 */
public class __Zip {
	
	public static Iterator<NamedInputStream> unzip(String file){
		try {
			ZipFile zipFile = new ZipFile(file);
			return new InputStreamIterator(zipFile);
		}catch(Exception ex) {
			throw new RuntimeException("解压失败", ex);
		}
	}
}
